package book.service.impl;

import book.dao.duzheDao;
import book.entity.duzhe;
import book.service.DuzheServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class DuZheServiceImpl implements DuzheServices {

    @Autowired
    private duzheDao d;

    @Override
    public List<duzhe> getAll(int offset, int limit, duzhe condition) {
        return d.getAll(offset,limit,condition);
    }

    @Override
    public int getCount() {
        return d.getCount();
    }

    @Override
    public void insert(duzhe dz) {
        d.insertEntity(dz);
    }

    @Override
    public void update(duzhe du) {
        d.updateEntity(du);
    }

    @Override
    public void delete(int id) {
        d.deleteEntity(id);
    }

    @Override
    public duzhe getById(Integer id) {
        return d.getById(id);
    }

    @Override
    public void todel(List<Integer> jihe) {
        d.batchDel(jihe);
    }

    @Override
    public void chongzhi(duzhe dz) {
        d.chongzhi(dz);
    }

    @Override
    public void updaduzhe(duzhe condition) {
        d.upduzhe(condition);
    }


}
